Optimal. Leaf size=71 \[ \frac {3 A x}{8 a^2 c^2}+\frac {3 A \cos (e+f x) \sin (e+f x)}{8 a^2 c^2 f}-\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {3669, 74, 653,
205, 211} \begin {gather*} -\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f}+\frac {3 A \sin (e+f x) \cos (e+f x)}{8 a^2 c^2 f}+\frac {3 A x}{8 a^2 c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 74
Rule 205
Rule 211
Rule 653
Rule 3669
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))^2} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(a+i a x)^3 (c-i c x)^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{\left (a c+a c x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f}+\frac {(3 A) \text {Subst}\left (\int \frac {1}{\left (a c+a c x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 f}\\ &=\frac {3 A \cos (e+f x) \sin (e+f x)}{8 a^2 c^2 f}-\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f}+\frac {(3 A) \text {Subst}\left (\int \frac {1}{a c+a c x^2} \, dx,x,\tan (e+f x)\right )}{8 a c f}\\ &=\frac {3 A x}{8 a^2 c^2}+\frac {3 A \cos (e+f x) \sin (e+f x)}{8 a^2 c^2 f}-\frac {\cos ^4(e+f x) (B-A \tan (e+f x))}{4 a^2 c^2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 53, normalized size = 0.75 \begin {gather*} \frac {-8 B \cos ^4(e+f x)+A (12 (e+f x)+8 \sin (2 (e+f x))+\sin (4 (e+f x)))}{32 a^2 c^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.17, size = 124, normalized size = 1.75
method | result | size |
risch | \(\frac {3 A x}{8 a^{2} c^{2}}-\frac {B \cos \left (4 f x +4 e \right )}{32 a^{2} c^{2} f}+\frac {A \sin \left (4 f x +4 e \right )}{32 a^{2} c^{2} f}-\frac {B \cos \left (2 f x +2 e \right )}{8 a^{2} c^{2} f}+\frac {A \sin \left (2 f x +2 e \right )}{4 a^{2} c^{2} f}\) | \(96\) |
norman | \(\frac {\frac {3 A x}{8 a c}-\frac {B}{4 a c f}+\frac {5 A \tan \left (f x +e \right )}{8 a c f}+\frac {3 A \left (\tan ^{3}\left (f x +e \right )\right )}{8 a c f}+\frac {3 A x \left (\tan ^{2}\left (f x +e \right )\right )}{4 a c}+\frac {3 A x \left (\tan ^{4}\left (f x +e \right )\right )}{8 a c}}{\left (1+\tan ^{2}\left (f x +e \right )\right )^{2} a c}\) | \(117\) |
derivativedivides | \(\frac {-\frac {3 i A \ln \left (-i+\tan \left (f x +e \right )\right )}{16}-\frac {-\frac {3 A}{16}-\frac {i B}{16}}{-i+\tan \left (f x +e \right )}-\frac {\frac {i A}{8}-\frac {B}{8}}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {-\frac {i A}{8}-\frac {B}{8}}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {-\frac {3 A}{16}+\frac {i B}{16}}{i+\tan \left (f x +e \right )}+\frac {3 i A \ln \left (i+\tan \left (f x +e \right )\right )}{16}}{f \,a^{2} c^{2}}\) | \(124\) |
default | \(\frac {-\frac {3 i A \ln \left (-i+\tan \left (f x +e \right )\right )}{16}-\frac {-\frac {3 A}{16}-\frac {i B}{16}}{-i+\tan \left (f x +e \right )}-\frac {\frac {i A}{8}-\frac {B}{8}}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {-\frac {i A}{8}-\frac {B}{8}}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {-\frac {3 A}{16}+\frac {i B}{16}}{i+\tan \left (f x +e \right )}+\frac {3 i A \ln \left (i+\tan \left (f x +e \right )\right )}{16}}{f \,a^{2} c^{2}}\) | \(124\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 1.14, size = 95, normalized size = 1.34 \begin {gather*} \frac {{\left (24 \, A f x e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (-i \, A - B\right )} e^{\left (8 i \, f x + 8 i \, e\right )} - 4 \, {\left (2 i \, A + B\right )} e^{\left (6 i \, f x + 6 i \, e\right )} - 4 \, {\left (-2 i \, A + B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, A - B\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{64 \, a^{2} c^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.37, size = 360, normalized size = 5.07 \begin {gather*} \frac {3 A x}{8 a^{2} c^{2}} + \begin {cases} \frac {\left (\left (16384 i A a^{6} c^{6} f^{3} e^{2 i e} - 16384 B a^{6} c^{6} f^{3} e^{2 i e}\right ) e^{- 4 i f x} + \left (131072 i A a^{6} c^{6} f^{3} e^{4 i e} - 65536 B a^{6} c^{6} f^{3} e^{4 i e}\right ) e^{- 2 i f x} + \left (- 131072 i A a^{6} c^{6} f^{3} e^{8 i e} - 65536 B a^{6} c^{6} f^{3} e^{8 i e}\right ) e^{2 i f x} + \left (- 16384 i A a^{6} c^{6} f^{3} e^{10 i e} - 16384 B a^{6} c^{6} f^{3} e^{10 i e}\right ) e^{4 i f x}\right ) e^{- 6 i e}}{1048576 a^{8} c^{8} f^{4}} & \text {for}\: a^{8} c^{8} f^{4} e^{6 i e} \neq 0 \\x \left (- \frac {3 A}{8 a^{2} c^{2}} + \frac {\left (A e^{8 i e} + 4 A e^{6 i e} + 6 A e^{4 i e} + 4 A e^{2 i e} + A - i B e^{8 i e} - 2 i B e^{6 i e} + 2 i B e^{2 i e} + i B\right ) e^{- 4 i e}}{16 a^{2} c^{2}}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.64, size = 67, normalized size = 0.94 \begin {gather*} \frac {\frac {3 \, {\left (f x + e\right )} A}{a^{2} c^{2}} + \frac {3 \, A \tan \left (f x + e\right )^{3} + 5 \, A \tan \left (f x + e\right ) - 2 \, B}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{2} a^{2} c^{2}}}{8 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.50, size = 53, normalized size = 0.75 \begin {gather*} \frac {3\,A\,x}{8\,a^2\,c^2}+\frac {{\cos \left (e+f\,x\right )}^4\,\left (\frac {3\,A\,{\mathrm {tan}\left (e+f\,x\right )}^3}{8}+\frac {5\,A\,\mathrm {tan}\left (e+f\,x\right )}{8}-\frac {B}{4}\right )}{a^2\,c^2\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________